﻿
new Vue({
    el: '#app',
    delimiters:['[[', ']]'],

    data: {
        banner_id: {{ banner.id }},
        banner_name: '{{ banner.name }}',
        banner_orderno: '{{ banner.orderno }}',
        banner_image_url: '{{ banner.image_url }}',
        banner_link_url: '{{ banner.link_url }}',
    },

    methods: {
        saveBannerInfo() {
            let url = "{% url 'gma:api_edit_banner' %}";
            let data = {
                'banner_id' : this.banner_id,
                'banner_name' : this.banner_name,
                'banner_orderno' : this.banner_orderno,
                'banner_image_url' : this.banner_image_url,
                'banner_link_url' : this.banner_link_url,
            };
            new my_ajax(url, data, '', '', () => {
                show_toast('修改成功');
                redirect();
            });
        },
    },

    mounted() {
    },
});
